import React from 'react';
import {show,hide} from './redux/actionCreator/HandleActions'
import {showList,hideList} from './redux/actionCreator/ListActions'
import testConnect from './testConnect'
// import {connect} from 'react-redux'

const Handle = (props) => {
    return (
        <div>
            <button onClick={()=>{
                props.show()
            }}>显示</button>
             <button onClick={()=>{
                props.hide()
            }}>隐藏</button>
            
            <div>
                <button onClick={()=>{
                    props.showList()
                }}>显示列表</button>
                <button onClick={()=>{
                    props.hideList()
                }}>隐藏列表</button>
            </div>
        </div>
    );
}





export default testConnect((state)=>{
    return{
        isList:state.ListReducer.isList
    }
},{
    show,
    hide,
    showList,
    hideList
})(Handle);
